#ifndef GENERICPLUGIN_H
#define GENERICPLUGIN_H

#include <QGenericPlugin>


// 插件要创建的对象
class ToolManager : public QObject
{
    Q_OBJECT
public:
    ToolManager(QObject *parent = nullptr) : QObject(parent) {}

public slots:
    void executeTool() { qDebug() << "Tool executed!"; }
};

///弹窗管理
class DialogManager : public QObject
{
    Q_OBJECT
public:
    DialogManager(QObject *parent = nullptr) : QObject(parent) {}

public slots:
    void showDialog() { qDebug() << "Dialog shown!"; }
};

class GenericPlugin : public QGenericPlugin
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID QGenericPluginFactoryInterface_iid FILE "pluginA.json")

public:
    explicit GenericPlugin(QObject *parent = nullptr);

private:
    QObject *create(const QString &name, const QString &spec) override;
};

#endif // GENERICPLUGIN_H
